package com.hlt.dto;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotBlank;

@Data
@ApiModel(description = "文章创建请求参数")
public class PostCreateDTO {
    @ApiModelProperty(value = "文章标题", required = true)
    @NotBlank(message = "标题不能为空")
    private String title;

    @ApiModelProperty(value = "文章内容", required = true)
    @NotBlank(message = "内容不能为空")
    private String content;

    @ApiModelProperty("文章分类ID")
    private Integer categoryId;

    @ApiModelProperty(value = "文章id",  required = false)
    private Integer postId;

}